import request from "@/utils/request";

export  function getList(pageNum,pageSize,categorys,productVO) {
    return request({
        url:'/product/getList',
        method:'post',
        params:{
            pageNum,
            pageSize,
            categorys
        },
        data:productVO
    })
}

/*
添加
 */
export function add(productVO){
    return request({
        url:'/product/add',
        method:'post',
        data:productVO
    })
}

/*
* 编辑*/
export  function edit(addProductVO) {
    return request({
        url:'/product/edit',
        method:'put',
        data:addProductVO
    })

}
/*
* 删除*/
export  function deleteById(id) {
    return request({
        url:'/product/delete',
        method:'delete',
        params:{id}

    })

}
/*
* 恢复和通过*/
export  function recover(id) {
    return request({
        url:'/product/recover',
        method:'get',
        params:{id}
    })

}
/*
* 回收站*/
export  function recycle(id) {
    return request({
        url:'/product/recycle',
        method:'get',
        params:{id}
    })

}


/*消费方列表*/
export  function getLists() {
    return request({
        url:'/business/consumer/getList',
        method:'get',
    })
}

/*添加出库单*/
export function addOutStocks(outStockVO){
    return request({
        url:'/business/out-stock/addOutStocks',
        method:'post',
        data:outStockVO
    })
}